package com.qiangesoft.blog.core.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.qiangesoft.blog.common.mvc.PageQuery;
import com.qiangesoft.blog.common.mvc.PageResultVO;
import com.qiangesoft.blog.common.result.ResponseResult;
import com.qiangesoft.blog.core.entity.BlogComment;
import com.qiangesoft.blog.core.pojo.dto.CommentDTO;
import com.qiangesoft.blog.core.pojo.vo.ArticleListVO;
import com.qiangesoft.blog.core.pojo.vo.SystemCommentVO;

import java.util.List;

/**
 * <p>
 * 博客评论 服务类
 * </p>
 *
 * @author qiange
 * @since 2023-06-05
 */
public interface IBlogCommentService extends IService<BlogComment> {

    /**
     * 统计文章评论数
     *
     * @param articleId
     * @return
     */
    Integer countCommentByArticleId(Long articleId);

    PageResultVO<SystemCommentVO> listComment(PageQuery pageQuery, String keywords);

    ResponseResult deleteBatch(List<Integer> ids);


    //    ------web端方法开始------
    PageResultVO<ArticleListVO> comments(Long articleId, PageQuery pageQuery);

    ResponseResult addComment(CommentDTO comment);

    ResponseResult repliesByComId(Integer commentId);
}
